home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Pascal Super Library
/
Pascal Super Library (CW International)(1997).bin
/
LIBRARY
/
CMPLTPAS
/
EVALUTOR.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1988-07-15
|
506b
|
24 lines
PROGRAM Evaluator;
VAR
SST : String;
R : Real;
Result : Integer;
BEGIN
REPEAT
Write('>>Enter a number in string form: ');
Readln(SST);
IF Length(SST) > 0 THEN
BEGIN
Val(SST,R,Result);
IF Result <> 0 THEN
Writeln
('>>Cannot evaluate that string. Check character #',Result)
ELSE
Writeln
('>>The numeric equivalent of that string is ',R:18:10)
END
UNTIL Length(SST) = 0
END.